console.log(1)

const p1 = new Promise((resolve) => {
  console.log(2)
  resolve()
})

setTimeout(() => {
  console.log(3)
})

p1.then(() => {
  console.log(4)
})


console.log(5)